<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>后台管理中心</title>  
    <link rel="stylesheet" href="/Public/Admin/css/pintuer.css">
    <link rel="stylesheet" href="/Public/Admin/css/admin.css">
    <script src="/Public/Admin/js/jquery.js"></script>  
    <script src="/Public/js/function.js"></script> 
    
<script src="/Public/Admin/js/pintuer.js"></script>
    
</head>
<body style="background-color:#f2f9fd;">
<div class="header bg-main">
  <div class="logo margin-big-left fadein-top">
    <h1><img src="/Public/Admin/images/y.jpg" class="radius-circle rotate-hover" height="50" alt="" />后台管理中心</h1>
  </div>
  <div class="head-l"><a class="button button-little bg-green" href="" target="_blank"><span class="icon-home"></span> 前台首页</a> &nbsp;&nbsp;<a href="##" class="button button-little bg-blue"><span class="icon-wrench"></span> 清除缓存</a> &nbsp;&nbsp;<a class="button button-little bg-red" href="login.html"><span class="icon-power-off"></span> 退出登录</a> </div>
</div>
<div class="leftnav">
  <div class="leftnav-title"><strong><span class="icon-list"></span>菜单列表</strong></div>
  <h2><span class="icon-user"></span>基本设置</h2>
  <ul style="display:block">
    <li><a href="info.html" target="right"><span class="icon-caret-right"></span>网站设置</a></li>
    <li><a href="pass.html" target="right"><span class="icon-caret-right"></span>修改密码</a></li>
    <li><a href="page.html" target="right"><span class="icon-caret-right"></span>单页管理</a></li>  
    <li><a href="adv.html" target="right"><span class="icon-caret-right"></span>首页轮播</a></li>   
    <li><a href="book.html" target="right"><span class="icon-caret-right"></span>留言管理</a></li>     
    <li><a href="column.html" target="right"><span class="icon-caret-right"></span>栏目管理</a></li>
  </ul>   
  <h2><span class="icon-pencil-square-o"></span>栏目管理</h2>
  <ul>
    <li><a href="list.html" target="right"><span class="icon-caret-right"></span>内容管理</a></li>
    <li><a href="add.html" target="right"><span class="icon-caret-right"></span>添加内容</a></li>
    <li><a href="cate.html" target="right"><span class="icon-caret-right"></span>分类管理</a></li>       
  </ul>  
  <h2><span class="icon-pencil-square-o"></span>用户管理</h2>
  <ul>
    <li><a href="<?php echo U('User/index');?>" target="right"><span class="icon-caret-right"></span>全部用户</a></li>
    <li><a href="<?php echo U('User/addUser');?>" target="right"><span class="icon-caret-right"></span>添加用户</a></li>       
  </ul> 
</div>
<script type="text/javascript">
$(function(){
  $(".leftnav h2").click(function(){
	  $(this).next().slideToggle(200);	
	  $(this).toggleClass("on"); 
  })
  $(".leftnav ul li a").click(function(){
	    $("#a_leader_txt").text($(this).text());
  		$(".leftnav ul li a").removeClass("on");
		$(this).addClass("on");
  })
});
</script>
<ul class="bread">
  <li><a href="{:U('Index/info')}" target="right" class="icon-home"> 首页</a></li>
  <li><a href="##" id="a_leader_txt">网站信息</a></li>
  <li><b>当前语言：</b><span style="color:red;">中文</php></span>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;切换语言：<a href="##">中文</a> &nbsp;&nbsp;<a href="##">英文</a> </li>
</ul>
<div class="admin">
  
   <!--  <div class="row">
        <div class="col-md-12 span_3">

            <form  id="add-form" role="form" class="form-horizontal" style="padding-top:40px;" action="<?php echo U('AddUser');?>" method="post">
                <div class="form-group">
                    <label class="col-md-2 control-label">用户名</label>
                    <div class="col-md-8">
                        <div class="input-group input-icon right">
									<span class="input-group-addon">
										<i class="fa fa-envelope-o"></i>
									</span>
                            <input id="username" class="form-control1" name="username" type="text" placeholder="用户名"
                                   data-toggle="popover" data-placement="right" data-content="">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <p class="help-block"></p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">EMAIL</label>
                    <div class="col-md-8">
                        <div class="input-group input-icon right">
									<span class="input-group-addon">
										<i class="fa fa-envelope-o"></i>
									</span>
                            <input id="email" class="form-control1" name="email" type="email" placeholder="email"
                                   data-toggle="popover" data-placement="right" data-content="">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <p class="help-block"></p>
                    </div>
                </div>

                <div class="form-group ">
                    <label class="col-md-2 control-label">密码</label>
                    <div class="col-md-8">
                        <div class="input-group input-icon right">
									<span class="input-group-addon">
										<i class="fa fa-key"></i>
									</span>
                            <input id="password" type="password" class="form-control1" name="password" placeholder="Password"
                                   data-toggle="popover" data-placement="right" data-content="">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <p class="help-block"></p>
                    </div>
                </div>

                <div class="form-group ">
                    <label class="col-md-2 control-label">确认密码</label>
                    <div class="col-md-8">
                        <div class="input-group input-icon right">
									<span class="input-group-addon">
										<i class="fa fa-key"></i>
									</span>
                            <input id="repassword" type="password" class="form-control1" placeholder="Password"
                                   data-toggle="popover" data-placement="right" data-content="">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <p class="help-block"></p>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">真实姓名</label>
                    <div class="col-md-8">
                        <div class="input-group input-icon right">
									<span class="input-group-addon">
										<i class="fa fa-envelope-o"></i>
									</span>
                            <input id="name" class="form-control1" name="name" type="text" placeholder="真实姓名"
                                   data-toggle="popover" data-placement="right" data-content="">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <p class="help-block"></p>
                    </div>
                </div>

                <div class="form-group ">
                    <label class="col-md-2 control-label">性别</label>
                    <div class="col-md-8">
                        <div class="input-group input-icon right">
                            <label class="radio-inline">
                                <input type="radio" name="sex" id="inlineRadio1" value="1"> 男
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="sex" id="inlineRadio2" value="2"> 女
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="sex" id="inlineRadio2" value="0" checked > 未知
                            </label>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">年龄</label>
                    <div class="col-md-8">
                        <div class="input-group input-icon right">
									<span class="input-group-addon">
										<i class="fa fa-envelope-o"></i>
									</span>
                            <input id="age" class="form-control1" name="age" type="text" placeholder="年龄"
                                   data-toggle="popover" data-placement="right" data-content="">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <p class="help-block"></p>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-8 col-sm-offset-2">
                        <button class="btn-success btn">添加</button>
                    </div>
                </div>

            </form>
            <script>
                var regForm = $('#add-form');
                var password2 = $('#repassword');
                var username = $('#username');
                var password = $('#password');
                var email = $('#email');
                var truename = $('#name');
                var age = $('#age');
                password2.change(function(){
                    if(password.val()!==password2.val()){
                        password2.attr('data-content','两次密码不一致');
                        password2.popover('show');
                    }
                });


                togglePopover(username,/^[\u4E00-\u9FA5a-zA-Z0-9_]{3,20}$/,'用户名格式不正确');
                togglePopover(email,/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,'email格式不正确');
                togglePopover(password,/^[a-zA-Z]\w{5,17}$/,'密码格式不正确');
                togglePopover(truename,/^[\u4E00-\u9FA5_]{2,6}$/,'姓名格式不正确');
                togglePopover(age,/^(?:[1-9][0-9]?|1[01][0-9]|120)$/,'年龄格式不正确');


                regForm.submit(function(){

                    var resUserName = checkRule(username, /^[\u4E00-\u9FA5a-zA-Z0-9_]{3,20}$/ );
                    if(!resUserName){
                        return false;
                    }
                    var resPassWord = checkRule(password,/^[a-zA-Z]\w{5,17}$/);
                    if(!resPassWord){
                        popMSG('密码格式','以字母开头，只能包含字符、数字和下划线的6-18个字符');
                        return false;
                    }
                    var resEmail = checkRule(email,/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/);
                    if(!resEmail){
                        popMSG('Email格式','Email格式不正确');
                        return false;
                    }
                    var resName = checkRule(true,/^[\u4E00-\u9FA5_]{2,6}$/);
                    if(!resName){
                        popMSG('姓名格式','姓名格式不正确');
                        return false;
                    }
                    var resAge = checkRule(true,/^(?:[1-9][0-9]?|1[01][0-9]|120)$/);
                    if(!resAge){
                        popMSG('年龄格式','年龄格式不正确');
                        return false;
                    }
                });
            </script>
        </div>
    </div> -->

<div class="panel admin-panel margin-top" id="add">
  <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 增加用户</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="<?php echo U('AddUser');?>">    
      <div class="form-group">
        <div class="label">
          <label>用户名：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="username" data-validate="required:请输入用户名" />
          <div class="tips"></div>
        </div>
      </div>

      <div class="form-group">
        <div class="label">
          <label>Email：</label>
        </div>
        <div class="field">
          <input type="email" class="input w50" value="" name="email" data-validate="required:请输入Email" />
          <div class="tips"></div>
        </div>
      </div>
        <div class="form-group">
            <div class="label">
                <label>密码：</label>
            </div>
            <div class="field">
                <input type="password" class="input w50" value="" name="password" data-validate="required:请输入密码" />
                <div class="tips"></div>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>确认密码：</label>
            </div>
            <div class="field">
                <input type="password" class="input w50" value="" name="repassword" data-validate="required:请确认密码" />
                <div class="tips"></div>
            </div>
        </div>
        <div class="form-group">
            <div class="label">
                <label>性别：</label>
            </div>
            <div class="field">
                <div class="button-group radio">
                    <label class="button active">
                        <span class="icon icon-check"></span>             
                        <input name="sex" value="0" type="radio" checked="checked">保密             
                    </label> 
                    <label class="button">
                        <span class="icon icon-check"></span>             
                        <input name="sex" value="1" type="radio" >男             
                    </label>             
                
                    <label class="button "><span class="icon icon-check"></span>            
                        <input name="sex" value="2" type="radio">女
                    </label>         
                </div>       
            </div>
         </div>
      <div class="form-group">
        <div class="label">
          <label>年龄：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="age" value="1"  data-validate="required:,number:年龄必须为1-120数字" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>


</div>
<div style="text-align:center;">
</div>
</body>
</html>